package org.example;

import cn.binarywang.tools.generator.*;
import org.junit.Test;

/**
 * @author zsc
 * @version 1.0
 */

public class Generator {
    @Test
    public void generateTest() {
        //地址
        String generatedAddress = ChineseAddressGenerator.getInstance()
                .generate();
        System.err.println(generatedAddress);

        //email
        String generatedEmail = EmailAddressGenerator.getInstance().generate();
        System.err.println(generatedEmail);

        //手机号码
        String generatedMobileNum = ChineseMobileNumberGenerator.getInstance()
                .generate();
        System.err.println(generatedMobileNum);

    }

    //身份证
    @Test
    public void testGenerate() {
        String idCard = ChineseIDCardNumberGenerator.getInstance().generate();
        System.err.println(idCard);
    }


    //公安局分局
    @Test
    public void testGenerateIssueOrg() {
        String issueOrg = ChineseIDCardNumberGenerator.generateIssueOrg();
        System.err.println(issueOrg);
    }

    //有效期
    @Test
    public void testGenerateValidPeriod() {
        for (int i = 0; i < 10; i++) {
            String result = ChineseIDCardNumberGenerator.generateValidPeriod();
            System.err.println(result);
        }
    }


    //银行卡号
    @Test
    public void bankCardNumberGeneratorTest() {
        String bankCardNo = BankCardNumberGenerator.generateByPrefix(436742);
        System.err.println(bankCardNo);

        System.err.println(BankCardNumberGenerator.getInstance().generate());
    }


    //Name
    @Test
    public void KcTest() {

        String generatedName = ChineseNameGenerator.getInstance().generate();
        System.err.println(generatedName);
        System.err.println(ChineseNameGenerator.getInstance().generateOdd());
    }

}
